#include <iostream>
#include "Must.h"
using namespace std;

int main()
{
	double *w, *I2_Re, *I2_Im;
	int nx = 201;
	double M = -1, I1 = 1, G = 1, L = 1, R = 1;

	w = AllocDouble1D(nx);
	I2_Re = AllocDouble1D(nx);
	I2_Im = AllocDouble1D(nx);


	for (int i = 0; i < nx; i++)
	{
		w[i] = pow(10, (i - 100) / 25.0);
		I2_Re[i] = -M * I1*G*pow(w[i], 2)*L / (pow(R, 2) + pow(w[i], 2)*pow(L, 2));
		I2_Im[i] = -M * I1*G*w[i] * R / (pow(R, 2) + pow(w[i], 2)*pow(L, 2));

	}
	WriteData1D(I2_Re, nx);
	//WriteData1D(I2_Im, nx);

	system("pause");
	return 0;
}